Configuring Alerts Using Email
Email alerts are available on both Windows and UNIX computers, but are configured differently for each.
On Windows computers, the License Manager calls the lsmail utility to send email alerts using SMTP.
After the License Manager installation, the utility is available under the following directory on Windows: <OSdrive>:\Program Files (x86)\Common Files\Thales\Sentinel RMS License Manager\WinNT.
In order to use lsmail:
1.Set up the alert
information section of the License Manager configuration file and use the
EMAIL statement to enable email alerts.
The file lsmail.exe should
be in the directory in which the License Manager resides.
2.Run lsmail.exe. The first time it is run, it will ask for the SMTP server address (the mail server). The default port number used is 25 and the sender name is SentinelLM.
NOTE An anti-virus or such a program may block the SMTP port and then alert generation via e-mail will fail. Hence, make sure that SMTP is unblocked on the License Manager host.
3.lsmail will automatically be called by the License Manager to send email when the alert action specified in the License Manager configuration file occurs.
If you want to run lsmail manually, the following options are available:
Option | Description |
---|---|
-t recipient-name |
Email address of the person who will receive the alert message. |
-m message-text |
Text of the alert message. |
-s subject |
Subject (if your email program accepts a subject argument). |
Debugging lsmail
If you are unable to send alerts using email due to any reason, you are required to debug lsmail.
To debug lsmail, create a batch file which returns "%Errorlevel%".
The contents of the batch file should be as follows:
lsmail -t "user@company123.com" -m "This is a test mail" -s "Test" echo %Errorlevel%
Error Codes
The following table provides the list of error codes and their corresponding descriptions.
Error # | Error Code | Error Description |
---|---|---|
0 | ALL_SUCCESS | Email successfully sent |
104 | ERR_SMTP_NOT_CONFIGURED | SMTP server is not configured |
116 | ERR_SOCKET_INIT_FAILED | Failed to initialize the sockets |
117 |
ERR_SMTP_CONNECTION_FAILED |
SMTP connection has failed |
118 | ERR_SENDMAIL_FAILED | Failed to send the email |
119 | ERR_INVALID_SENDER_NAME | Name of the sender is invalid |
The mail sending program to use can be customized via the MAILPGM environment variable. If MAILPGM is not set, the first program found from the following locations will be used. Search the path in the License Manager’s start-up environment (PATH environment variable). Any command/shell aliases will be ignored.
>“/usr/bin/mailx”
>“/usr/ucb/mail”
>“/usr/bin/mail”
>“/bin/mail”
If no program is found via search or MAILPGM, the email mechanism will be off. The mail program will be invoked in a manner equivalent to:
MAILPGM email-recipient-list text-of-alert-message
No subject is provided.
If your mail program accepts a subject via the -s option, you could use:
MAILPGM= /usr/ucb/mail -s "Alert message"
to receive a subject for outgoing alert email.
The configuration file is read once per feature and version on the first addition of that feature (not necessarily at the License Manager start time), and the statements for that feature and version are cached. If you change the entries applicable to a feature, you should restart the License Manager.